package com.mk.dao.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;

/** Created by user on 2020/11/5. */
@Setter
@Getter
public abstract class AbstractBaseModel<T extends AbstractBaseModel<?>> extends Model<T> {

  @TableId(value = "id", type = IdType.ASSIGN_ID)
  private String id;

  /** 创建日期 - 现在时表示主动创建 */
  @TableField(value = "create_time", fill = FieldFill.INSERT)
  private LocalDateTime createTime;

  /** 修改时间 - 过去分词表示被动更新 */
  @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
  private LocalDateTime modifyTime;

  /** '是否删除 0：未删除 1：已删除' */
  @TableField(value = "is_del", fill = FieldFill.INSERT)
  private Integer isDel = 0;
}
